package util;

import java.awt.Color;
import java.awt.Image;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

import layout.TableLayout;

public class ImageFileChooserBorderPanel extends JPanel {
	private static final long serialVersionUID = 1L;
	private ImageFileChooserImagePanel inset;
	private double[][] tbSize = new double[][] {
			{ 0.05, TableLayout.FILL, 0.05 }, { 0.2, TableLayout.FILL, 0.2 } };

	public ImageFileChooserBorderPanel() {
		this.setLayout(new TableLayout(tbSize));
		this.add(inset = new ImageFileChooserImagePanel(), "1,1");
		this.setBorder(BorderFactory.createLineBorder(Color.GRAY));
//		this.setBorder(BorderFactory.createEtchedBorder());
		setBackground(Color.WHITE);
		
	}

	public void setImage(Image image) {
		inset.setImage(image);
	}

}
